﻿using Fozzy;
using Fozzy.Family;
using Fozzy.Skin;
using Fozzy.Space;
using Fozzy.Time;
using System;

namespace Microsoft.FamilyShow
{
    /// <summary>
    /// A Selection is specific, in the sens that it manipulates a criteria
    /// applied on a specific property of a IConcept
    /// </summary>
    /// <typeparam name="result"></typeparam>
    /// <typeparam name="criteria"></typeparam>
    public abstract class  Match                        : Concept<Fozzy.Family.Person2>
    {
        #region Declarations
        #endregion

        #region States
            public abstract bool    Matching            { get                                                                           ; }
            protected       bool    Place_Match         { get { return Place.Be(Value.Birth_Date_Place) || Place.Be(Value.Death_Place)  ; } }
            protected       bool    Birthday_Match      { get { return Value.Birthday.Be(Month, Day)                                    ; } }
        #endregion

        #region Properties
            protected Year Year                         { get { return new Year     (Name)                                              ; } }
            protected Month Month                       { get { return new Month    (Name)                                              ; } }
            protected Day   Day                         { get { return new Day      (Name)                                              ; } }
            protected Place Place                       { get { return new Place    (Name)                                              ; } }
        #endregion

        #region Constructeurs
            public Match(Person2 person)                : base(person)
            {}
        #endregion
    }
}
